package com.baiduspring.utils.bean;

import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Objects;

/**
 * 分页工具bean
 *
 * @author xiongyan
 */
@Data
@Accessors(chain = true)
public class PageBean {
    public static final Integer PAGESIZE = 10;
    private Integer currentPage;
    private Long total;
    private Long totalPages;

    public Integer currentPage() {
        if (Objects.isNull(this.currentPage)) {
            return 0;
        }
        return this.currentPage;
    }
}
